<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>商品添加</title>

    <div th:replace="common_cssjs"></div>
    <link type="text/css" rel="stylesheet" media="screen" th:href="@{/css/index.css}">

</head>

<body>
<div th:replace="common/header::nav"></div>
<div class="container">
    <div class="col-md-6 col-md-offset-3">
        <form id="inputForm" role="form" th:action="@{/admin/product/new}"
                   method="post" class="form-horizontal" enctype="multipart/form-data">
            <div class="form-group">
                <label class="col-sm-2 control-label">商品名称</label>
                <div class="col-sm-10">
                    <input minlength="6" required class="form-control" type="text" id="title" name="title"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">商品价格</label>

                <div class="col-sm-10">
                    <input required class="form-control" type="text" id="point" name="point"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">商品编码</label>

                <div class="col-sm-10">
                    <input class="form-control" type="text" id="code" name="code"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">商品型号</label>

                <div class="col-sm-10">
                    <input class="form-control" type="text" id="model" name="model"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">商品库存</label>

                <div class="col-sm-10">
                    <input class="form-control" required type="number" id="stock" name="stock"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="pic">封面图片</label>
                <div class="col-sm-10">
                    <input type="file" id="pic" name="file">
                    <p class="help-block">图片不能超过1MB.</p>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">商品简介：</label>

                <div class="col-sm-10">
                    <textarea class="form-control" name="note"></textarea>
                </div>
            </div>
            <div class="text-center">
                <button type="submit" class="btn btn-primary">保存</button>
            </div>
        </form>
    </div>
</div>
<!-- /container -->
</body>
</html>